/*******************************************************************************
  * @file                   usart.h
  * @Author:                MQjehovah                 mail:MQjehovah@hotmail.com
  * @version                1.0.0
  * @date                   2017-12-22 10:25:23
  * @brief                  
  ******************************************************************************
  * @attention
*******************************************************************************/
#ifndef __USART_H
#define __USART_H
/* Includes ------------------------------------------------------------------*/
#include "bsp.h"
/* Definition ----------------------------------------------------------------*/
#define USART3_RX_EN //使能串口中断接收
#define DEBUG
#define USART_DEBUG USART1

#define USART_RX_EN GPIO_ResetBits(GPIOB, GPIO_Pin_5)
#define USART_TX_EN GPIO_SetBits(GPIOB, GPIO_Pin_5)
/* Exported Functions --------------------------------------------------------*/
void usart_send_char(USART_TypeDef *USARTx, char c);
void usart_send_str(USART_TypeDef *USARTx, char *senddata);
void usart_send_number(USART_TypeDef *USARTx, unsigned long n, u8 base);
#ifdef DEBUG
void usart_debug_init(u32 bound);
void debug_send_char(u8 c);
void debug_send_str(char *str);
#endif
#endif
/*********************************END OF FILE**********************************/
